home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-12-17 | 1.1 KB | 48 lines | [TEXT/PJMM] |
- program TestBed;
-
- uses
- ParameterDef, Lookup;
-
- var
- p: parameterRecord;
- i: longInt;
- ch: char;
- sysenv: sysEnvRec;
- oe: OSErr;
- begin
- p.fingeredname := stringPtr(newPtr(256));
- p.param := stringPtr(newPtr(256));
- p.returnvalue := stringPtr(newPtr(256));
- p.returnValue^ := '';
- p.hlength := 5000;
- p.fingeroutput := NewHandle(p.hlength);
- p.offset := 0;
- p.idle := 73; { 1 min, 13 sec }
- p.remoteIP := $12345678; {18.52.86.120}
- p.expandtokens := true;
- oe := SysEnvirons(1, sysenv);
- oe := SetVol(nil, sysenv.SysVRefNum);
-
- p.fingeredname^ := 'sch';
- p.param^ := '';
-
- ShowText;
- writeln('Call with parameter "', p.param^, '", and name "', p.fingeredname^, '"');
- Main(p);
- if p.returnValue^ <> '' then
- writeln('Gives string: "', p.returnValue^, '"');
- if p.offset <> 0 then begin
- writeln('Gives expandtokesns: ', p.expandtokens);
- writeln('Gives handle:');
- HLock(p.fingeroutput);
- write('"');
- for i := 0 to p.offset - 1 do begin
- ch := chr(BAND(ptr(longInt(p.fingeroutput^) + i)^, $FF));
- if ch = chr(13) then
- writeln
- else
- write(ch);
- end;
- writeln('"');
- end;
- end.